﻿using System.Data.Objects;

namespace HooIzDat.Web.Models
{
    public static class AggregateExtensions
    {
        public static ObjectQuery<Game> AsAggregate(this ObjectSet<Game> games) 
        {
            return games.Include("GameState")
                        .Include("GameState.ActivePlayer")
                        .Include("Player1")
                        .Include("Player2")
                        .Include("Player1Character")
                        .Include("Player2Character");
        }
    }
}
